package com.company.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class SysPermission implements Serializable {


    @TableId(type = IdType.UUID)
    private String id;

    @NotBlank(message = "菜单权限名称不能为空")
    @ApiModelProperty(value = "菜单权限名称", name = "name")
    private String name;

    @ApiModelProperty(value = "授权(多个用逗号分隔，如：sys:user:add,sys:user:edit)", name = "perms")
    private String perms;

    @ApiModelProperty(value = "访问地址URL", name = "url")
    private String url;

    @ApiModelProperty(value = "图标", name = "icon")
    private String icon;

    @ApiModelProperty(value = "a target属性:_self _blank", name = "target")
    private String target;

    @NotNull(message = "所属菜单不能为空")
    @ApiModelProperty(value = "父级菜单权限名称", name = "pid")
    private String pid;

    @ApiModelProperty(value = "排序", name = "orderNum")
    private Integer orderNum;

    @NotNull(message = "菜单权限类型不能为空")
    @ApiModelProperty(value = "菜单权限类型(1:目录;2:菜单;3:按钮)", name = "type")
    private Integer type;

    @ApiModelProperty(value = "设备号", name = "name")
    private Integer status;

    @ApiModelProperty(value = "状态1:正常 0：禁用", name = "createTime")
    private Date createTime;

    @ApiModelProperty(value = "更新时间", name = "updateTime")
    private Date updateTime;

    @TableLogic
    @ApiModelProperty(value = "是否删除(1未删除；0已删除)", name = "deleted")
    private Integer deleted;

    @TableField(exist = false)
    private String pidName;
    
}